package com.bishe.demo.modules.tourism.service.impl;

import com.bishe.demo.modules.common.entity.ResultEntity;
import com.bishe.demo.modules.tourism.dao.RouteEvaluationDao;
import com.bishe.demo.modules.tourism.dao.RouteOrderDao;
import com.bishe.demo.modules.tourism.entity.RouteEvaluation;
import com.bishe.demo.modules.tourism.service.RouteEvaluationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @Description RouteEvaluationServiceImpl
 * @Author Lubb
 * @Date 2021/4/9 16:32
 */
@Service
public class RouteEvaluationServiceImpl implements RouteEvaluationService {
    @Autowired
    private RouteEvaluationDao routeEvaluationDao;
    @Autowired
    private RouteOrderDao routeOrderDao;

    @Override
    @Transactional
    public ResultEntity<RouteEvaluation> addRouteEvaluation(RouteEvaluation routeEvaluation) {
        routeEvaluationDao.addRouteEvaluation(routeEvaluation);
        return new ResultEntity<RouteEvaluation>(ResultEntity.ResultStatus.SUCCESS.code,
                "Add RouteEvaluation Success",routeEvaluation);
    }
}
